-
Notifications
You must be signed in to change notification settings - Fork 53
feat: add scalar argument support to searchsorted
#982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ev-br
approved these changes
Nov 17, 2025
Member
ev-br
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ev-br
added a commit
to ev-br/array-api-tests
that referenced
this pull request
Nov 17, 2025
ev-br
added a commit
to ev-br/array-api-tests
that referenced
this pull request
Nov 17, 2025
ev-br
added a commit
to ev-br/array-api-tests
that referenced
this pull request
Nov 17, 2025
ev-br
added a commit
to ev-br/array-api-tests
that referenced
this pull request
Dec 2, 2025
Contributor
Author
|
As no objections have been raised and this was previously discussed during workgroup meetings, I'll go ahead and merge. |
ev-br
added a commit
to ev-br/cupy
that referenced
this pull request
Dec 8, 2025
The upcoming Array API revision 2025.12 will allow the second argument of searchsorted to be a python scalar, cf data-apis/array-api#982
Member
|
For completeness, here's a matching CuPy enhancement proposal: cupy/cupy#9512 |
ev-br
added a commit
to ev-br/cupy
that referenced
this pull request
Dec 8, 2025
The upcoming Array API revision 2025.12 will allow the second argument of searchsorted to be a python scalar, cf data-apis/array-api#982
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR
xp.searchsorted#967 by adding scalar argument support to the second argument insearchsortedand thus satisfies a common use case where one wants to search for a single value in an input array.searchsortedis only defined for real-valued arrays in the specification, as only real-values have a defined sort order.